

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>用户信息填写</title>
</head>
<body>
<form method="post">
    <table>
    <tr><td>呢称:</td>
        <td><input type="text" name="nickname" value="<?php echo $data['nickname']; ?>"/></td>
    </tr>
    <tr><td>性别:</td>
        <td><input type="radio" name="gender" value="男" <?php if($data['gender']=='男') echo 'checked' ?>/>男
            <input type="radio" name="gender" value="女" <?php if($data['gender']=='女') echo 'checked' ?>/>女</td>
        </tr>
    <tr><td>邮箱:</td>
        <td><input type="text" name="email" value ="<?php echo $data['email']; ?>" /></td>
    </tr>
    <tr><td>QQ号:</td>
         <td><input type="text" name="qq"  value ="<?php echo $data['qq']; ?>"/></td>
    </tr>
    <tr><td>个人主页:</td>
        <td><input type="text" name="url"  value ="<?php echo $data['url']; ?>"/></td>
    </tr>
    <tr><td>所在城市:</td>
        <td><select name="city"><option value="未选择">未选择</option>
                <?php foreach($city as $v): ?>
                <option value="<?php echo $v ?>"<?php if($data ['city']==$v) echo
                 'select'; ?>><?php echo $v ?>
                </option></select>
            <?php endforeach; ?>
        </td>
    </tr>
    <tr><td>语言技能:</td>
        <td><?php foreach($skill as $v):?>
            <input type="checkbox" name="skill" value="<?php echo $v;?>"
            <?php if(in_array($v,$data['skill'])) echo 'checked';?> />
            <?php echo $v;?>
            <?php endforeach; ?>
            <input type="checkbox" name="skill[]" value="HTML" />HTML
            <input type="checkbox" name="skill[]" value="JavaScript" />JavaScript
            <input type="checkbox" name="skill[]" value="PHP" />PHP
            <input type="checkbox" name="skill[]" value="C++" />C++</td>
    </tr>
    <tr><td>自我介绍:</td>
        <td><textarea name="description" /><?php echo $data['description']; ?></textarea></td>
    </tr>
    <tr><td><input type="submit" value="保存资料" /></td>
         <td><input type="reset" value="重新填写" /></td>
    </tr>
    </table>
</form>
</body>
</html>